/* GUI CONVERTED from rsrsdupa.p (converter v1.75) Sat Aug 12 23:15:53 2000 */
/* rsrsdupa.p - Release Management Supplier Schedules                   */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*F0PN*/ /*V8:ConvertMode=Maintenance                                   */
/*K1Q4*/ /*V8:WebEnabled=No                                             */
/* REVISION: 7.3    LAST MODIFIED: 04/25/94           BY: WUG *GJ59*    */
/* REVISION: 7.3    LAST MODIFIED: 01/02/96           BY: kjm *G1HR*    */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98           BY: *K1Q4* Alfred Tan */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00           BY: *N0KP* myb        */


/* UPDATE REMOTE DATABASE PO DETAIL RECORD */


     define shared frame hf_po_mstr.
     define shared frame hf_pod_det.

/*G1HR*/ FORM /*GUI*/ 
/*G1HR*/    po_sch_mthd format "x(3)"
/*G1HR*/ with frame hf_po_mstr width 80 THREE-D /*GUI*/.


     FORM /*GUI*/ 
        po_mstr
/*G1HR*  with frame hf_po_mstr. */
/*G1HR*/ with frame hf_po_mstr width 80 THREE-D /*GUI*/.


     FORM /*GUI*/ 
        pod_det
/*G1HR*  with frame hf_pod_det.  */
/*G1HR*/ with frame hf_pod_det width 80 THREE-D /*GUI*/.


     do with frame hf_pod_det.
        find pod_det where pod_nbr = input pod_nbr
        and pod_line = input pod_line exclusive-lock no-error.

        if not available pod_det then create pod_det.
        assign pod_det.
     end.

     do with frame hf_po_mstr:
        find po_mstr where po_nbr = pod_nbr exclusive-lock no-error.

        if not available po_mstr then create po_mstr.
        assign po_mstr.
     end.


     if not can-find(scx_ref where scx_type = 2 and scx_order = pod_nbr
     and scx_line = pod_line) then do:
        create scx_ref.

        assign
           scx_type          = 2
           scx_shipfrom      = po_vend
           scx_shipto        = pod_site
           scx_part          = pod_part
           scx_po            = pod_nbr
           scx_order         = pod_nbr
           scx_line          = pod_line.
     end.
